<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
    </head>
    <body>
        <script>
            //声明变量
            let a=100;
            let b,c,d,e;
            //1.变量不能重复声明
           /*  let star = "王力宏";
            let star = "lihong"; */
            //2.块级作用域
            /* {
                let boy = "王力宏";
            }
            console.log(boy); */

            //3.不存在变量提升
            /* console.log(song);
            let song = "依然爱你";
             console.log(song1);
            var song1 = "花田错"; */

            // 4.不影响作用域链
            let school = "师院";
            {
                
                function fn(){
                    console.log(school);
                };
                fn();
            }

        </script>
    </body>
</html>